using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace ElasticReflection
{
    /// <summary>
    /// Wrapper for EventInfo class to simplify functionality
    /// </summary>
    public class ElasticEvent : ElasticMember<EventInfo>
    {
        
        public ElasticEvent(ElasticType Parent, EventInfo Base)
            : base(Parent,Base)
        {
            
        }

        public void Add(Delegate Handler)
        {
            Base.AddEventHandler(Instance, Handler);
        }

        public void Remove(Delegate Handler)
        {
            Base.RemoveEventHandler(Instance, Handler);
        }

        public object Raise(params object[] Parameters)
        {
            return Base.RaiseMethod.Invoke(Instance, Parameters);
        }

    }
}
